package com.px.auth.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class UserModel {
    private Long id;
    private String username;
    private String roles;
    private String phone;
    @JsonIgnore
    private String password;
    private Integer disabled;
    private String ip;

    public String json2roles(String roles) {
        return roles.replace("[", "")
                .replace("]", "")
                .replace("\"", "");
    }
}
